package com.jin.concurrent.example.publish;

import com.alibaba.fastjson.JSON;
import com.jin.concurrent.annoations.NotThreadSafe;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;

/**
 * @author JinLiu
 */
@Slf4j
@NotThreadSafe
public class UnsafePublish {

    @Getter
    private String[] states = {"a", "b", "c"};

    public static void main(String[] args) {
        UnsafePublish unsafePublish = new UnsafePublish();
        log.info("{}", JSON.toJSONString(unsafePublish));

        unsafePublish.getStates()[0] = "d";

        log.info("{}", JSON.toJSONString(unsafePublish));
    }

}
